<template>
  <div>
    <!-- <el-card class="box-card card-top" body-style="padding:10px">
      <h5>系统通知</h5>
    </el-card> -->
    <el-empty v-if="adminMes.length==0" description="暂无系统通知"></el-empty>
    <div v-else>
      <el-card class="box-card" body-style="padding:10px" v-for="aItem in adminMes" :key="aItem.amId">

        <div class="admin">
          <div class="adminMes">
            <h3>{{aItem.titleName}}</h3>
            <div class="adminMes_mes">
              <h4>{{aItem.message}}</h4>
              <h4>{{aItem.aTime}}</h4>
              <h4>{{aItem.admin}}</h4>
            </div>
          </div>
          <img :src="aItem.pImg" alt="" class="adminImg">
        </div>
      </el-card>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      adminMes: []
    }
  },
  created(){
    this.getAdminMesByuId()
  },
  methods:{
    // 获取系统通知
    getAdminMesByuId(){
      const uId = this.cookies.getUid("uId")
      this.$axios.getAdminMesByuId(uId).then(res=>{
        console.log(res)
        this.adminMes = res.data
      })
    },
    getpostMesBypId(pId){
      this.$axios.getpostMesBypId(pId).then(res=>{
        console.log(res)
      })
    }
  }
}
</script>
<style scoped>
  .box-card {
    margin-top: 10px;
  }
  .card-top {
    position: fixed;
    top: 60px;
    width: 950px;
  }
  .admin {
    display: flex;
    justify-content: space-between;
  }
  .adminMes {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
  .adminMes_mes {
    display: flex;
    justify-content: space-around;
  }

  .adminImg {
    width: 200Px;
  }
</style>
